<#-- 导入模版定义文件-->
<#include "../template/template_editPage.ftl">
<@edit title="订单详细信息">
    <#if (operation.code)??>
        <#assign isEdit = true />
    <#else>
        <#assign isAdd = true />
    </#if>
<body class="input">
<script type="text/javascript">
    $().ready(function () {
		<#if actionErrors??&&(actionErrors?size > 0)>
			$.dialog({type: "warn", content: "<#list errorMessages as list>${list}<br></#list>",
			 modal: true, autoCloseTime: 3000});
		</#if>
    });
</script>
<div class="body">
<div class="inputBar">
    <h1><span class="icon">&nbsp;</span>订单详细信息</h1>
</div>
<form id="validateForm" class="validate" method="post" action="${web_base}/recharge/orders!manual.htm">
    <table class="inputTable tabContent">
        <tr>
            <th>订单流水:</th>
            <td>${(orders.id)!}<input type="hidden" name="orders.id" value="${(orders.id)!}"/></td>
        </tr>
        <tr>
            <th>订单类型:</th>
            <td>
                <#if orders.type??&& orders.type==1>直充<#elseif orders.type??&&orders.type==0>卡充<#else >未知</#if>
            </td>
        </tr>
        <tr>
            <th>成本价:</th>
            <td>${money((orders.costPrice)!)} 元</td>
        </tr>
        <tr>
            <th>代理商价格:</th>
            <td>${money((orders.agentPrice)!)} 元
            </td>
        </tr>
        <tr>
            <th>门店价格:</th>
            <td>${money((orders.sellerPrice)!)} 元</td>
        </tr>
        <tr>
            <th>销售价格:</th>
            <td>${money((orders.sellingPrice)!)} 元</td>
        </tr>
        <tr>
            <th>商品标价:</th>
            <td>${money((orders.price)!)} 元</td>
        </tr>
        <tr>
            <th>利润:</th>
            <td>${money((orders.profit)!)} 元</td>
        </tr>
        <tr>
            <th>充值号码:</th>
            <td>${(orders.buyer)!}</td>
        </tr>
        <tr>
            <th>订单发起方:</th>
            <td>${(orders.sellerId)!}</td>
        </tr>
        <tr>
            <th>代理商编号:</th>
            <td>${(orders.agentId)!}</td>
        </tr>
        <tr>
            <th>渠道商编号:</th>
            <td>${(orders.channelsId)!}</td>
        </tr>
        <tr>
            <th>商品名称:</th>
            <td>${(orders.productName)!}</td>
        </tr>
        <tr>
            <th>所属客服人员编号:</th>
            <td>${(orders.servicerId)!}</td>
        </tr>
        <tr>
            <th>所属客服人员编号:</th>
            <td>${(orders.servicerId)!}</td>
        </tr>
        <tr>
            <th>同步次数:</th>
            <td>${(orders.synCount)!}</td>
        </tr>
        <tr>
            <th>同步次错误代码:</th>
            <td>${(orders.errorCode)!}</td>
        </tr>

        <tr>
            <th>第三方成功接收收充值请求:</th>
            <td><#if orders.answerSuccess??> <#if orders.answerSuccess >成功<#else>失败</#if><#else>--</#if></td>
        </tr>
        <tr>
            <th>第三方成功接收收充值请求时间:</th>
            <td>
                <#if orders.answerSuccessTime?exists&&orders.answerSuccessTime?is_date>
                          ${(orders.answerSuccessTime?string("yyyy-MM-dd HH:mm:ss"))}
                    </#if>
            </td>
        </tr>


        <tr>
            <th>第三方接口:</th>
            <td>${(orders.thirdInterface)!}</td>
        </tr>
        <tr>
            <th>第三方充值账号:</th>
            <td>${(orders.thirdInterfaceAccount)!}</td>
        </tr>
        <tr>
            <th>同步失败码:</th>
            <td>${(orders.errorCode)!}</td>
        </tr>
        <tr>
            <th>状态:</th>
            <td>
                <#if orders.status??&&orders.status==0>未付款<#elseif  orders.status??&&orders.status==1>
                    已经付款<#elseif  orders.status??&&orders.status==2>未收到第三方接收成功通知
                <#elseif  orders.status??&&orders.status==3>收到第三方接收成功通知<#elseif  orders.status??&&orders.status==4>
                    订单充值失败
                <#elseif  orders.status??&&orders.status==5>订单充值成功<#elseif  orders.status??&&orders.status==6>订单部分成功
                <#elseif  orders.status??&&orders.status==9>问题订单<#else>其他</#if>
            </td>
        </tr>
        <tr>
            <th>更新时间:</th>
            <td>
                <#if orders.updateTime?exists&&orders.updateTime?is_date>
                      ${(orders.updateTime?string("yyyy-MM-dd HH:mm:ss"))}
                    </#if>
            </td>
        </tr>
        <tr>
            <th>更新操作人:</th>
            <td>${(orders.updateOperator)!}</td>
        </tr>
        <tr>
            <th>创建时间:</th>
            <td>
                <#if orders.createTime?exists&&orders.createTime?is_date>
                         ${(orders.createTime?string("yyyy-MM-dd HH:mm:ss"))}
                    </#if>
            </td>
        </tr>
        <tr>
            <th>订单是否充值成功:</th>
            <td>
                <#if editPay??&&!editPay&&orders.orderSuccess??&&!orders.orderSuccess>
                    <select name="orders.orderSuccess">
                        <option value="true">是</option>
                        <option value="false" selected="selected">否</option>
                    </select>
                    <input type="hidden" name="editPay" value="false">
                <#else >
                    <#if orders.orderSuccess??&&orders.orderSuccess >是<#else >否</#if>
                </#if>
            </td>
        </tr>
        <tr>
            <th>充值成功的时间:</th>
            <td>
                <#if orders.orderSuccessTime?exists&&orders.orderSuccessTime?is_date>
                    ${(orders.orderSuccessTime?string("yyyy-MM-dd HH:mm:ss"))}
                    </#if>
            </td>
        </tr>
        <tr>
            <th>是否支付:</th>
            <td>
                <#if editPay??&&editPay&&orders.pay??&&!orders.pay>
                    <select name="orders.pay">
                        <option value="true">是</option>
                        <option value="false" selected="selected">否</option>
                    </select>
                    <input type="hidden" name="editPay" value="true">
                <#else >
                    <#if orders.pay??&& orders.pay >是<#else >否</#if>
                </#if>
            </td>
        </tr>
        <tr>
            <th>支付系统订单号:</th>
            <td>${(orders.payOrderId)!}</td>
        </tr>
        <tr>
            <th>支付成功时间:</th>
            <td>
                <#if orders.payTime?exists&&orders.payTime?is_date>
                         ${(orders.payTime?string("yyyy-MM-dd HH:mm:ss"))}
                      </#if>
            </td>
        </tr>

        <tr>
            <th>手动操作人:</th>
            <td>
                ${(orders.managerId)!}
            </td>
        </tr>
        <tr>
            <th>手动操作备注:</th>
            <td>
                <#if editPay??>
                <textarea name="orders.managerRemark">${(orders.managerRemark)!} </textarea>
                <#else>${(orders.managerRemark)!}
                </#if>
           </td>
        </tr>

    </table>
    <div class="buttonArea">
        <#if editPay??>
            <input type="submit" class="formButton" value="提交"/>
        </#if>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回"
               hidefocus="true"/>
    </div>
</form>
</div>
</body>

</@edit>